<%--
  Created by IntelliJ IDEA.
  User: zhaocan
  Date: 2018/5/7
  Time: 11:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/pages/common/meta.jsp"%>
<!--近24小时工单类型处理概况开始(不包含申诉，2018-05-07)-->
<div class="ys-module-wrap b40-box" style="margin-right: 0;">
    <div class="ys-module-title">
        <h2>近24小时工单类型处理概况</h2>
    </div>
    <div class="ys-module-con">
        <div id="orderTypeChart" style="width:100%; height: 256px; text-align: center;"></div>
    </div>
</div>
<script type="text/javascript">
    function initorderTypeChart(){
        uceAjax(G_CTX_PATH+"/cs/CsOrderStatistic/getNear24hOrderTypeStatistics.do", {}, function(result){
                var typeArray =new Array();
                var dataArray =new Array();
                for(var i =0;i<result.length;i++){
                    typeArray.push(result[i].ORDER_NAME);
                    dataArray.push({value:result[i].NUM,name:result[i].ORDER_NAME});
                }
                var orderTypeChart = echarts.init(document.getElementById('orderTypeChart'));
                orderTypeOption = {
                    tooltip: {
                        trigger: 'item',
                        formatter: "{b} : {c} ({d}%)"
                    },
                    color:['#ef5350', '#558b2f','#ffc400'],
                    legend: {
                        // orient: 'vertical',
                        // top: 'middle',
                        bottom: 0,
                        left: 'center',
                        data: typeArray
                    },
                    series: [
                        {
                            type: 'pie',
                            radius: '60%',
                            center: ['50%', '40%'],
                            selectedMode: 'single',
                            data: dataArray,
                            itemStyle: {
                                emphasis: {
                                    shadowBlur: 10,
                                    shadowOffsetX: 0,
                                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                                }
                            }
                        }
                    ]
                };

                orderTypeChart.setOption(orderTypeOption);
        },"GET");
    }
    initorderTypeChart();
</script>
<!--近24小时工单类型处理概况结束-->
</div>
